package com.lanmao.blog.mapper;

import com.lanmao.blog.entity.Blog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.lanmao.blog.vo.CountVo;
import com.lanmao.blog.vo.FristBlog;
import com.lanmao.blog.vo.HotBlog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lanmao
 * @since 2022-03-13
 */
public interface BlogMapper extends BaseMapper<Blog> {
    //根据id查找博客
    Blog getByBlogId(@Param("id") String id);
    //前台分页查询
    List<FristBlog> prefindByPage(@Param("current") Long current, @Param("size")Long size,
                                  @Param("typeid") Long type_id, @Param("tagsid") Long tags_id);


    List<CountVo> findAllBlog();

    List<Blog> getByTitle(String title);

    List<FristBlog> pregetByTitle(String title);

    List<HotBlog> getHotBlog();

}
